package com.usian.admin;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.usian.common.exception.ExceptionCatch;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;

/**
 * Auther：DONG on 2021/11/2
 **/
@SpringBootApplication
@MapperScan("com.usian.admin.mapper")
@EnableDiscoveryClient
public class AdminApplication {
    public static void main(String[] args) {
        SpringApplication.run(AdminApplication.class,args);
    }

    /**
     * mybatis-plus分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
    //注入统一处理异常类
//    @Bean
//    public ExceptionCatch exceptionCatch(){
//        return  new ExceptionCatch();
//    }
}

